import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

export default new Vuex.Store({
	state: {
		userInfo: {}
	},
	mutations: {
		setUser: (state, user) => {
			console.log(user);
			localStorage.setItem('user', JSON.stringify(user));
		},
		logout: (state)=>{
			localStorage.removeItem('user');
			localStorage.clear;
		 }
	},
	actions: {},
	modules: {}
});
